package ywpt.service.system;
import java.util.List;

import ywpt.components.acegi.domain.User;

import org.hibernate.criterion.DetachedCriteria;

public interface UserService {
	public abstract User getUserById(Long id);
	public abstract List<User> getAllUsers();
	public List<User> getUsers(DetachedCriteria query);
	public List<User> getUsers(DetachedCriteria query,int pageSize,int startIndex);
	public int getUsersCount(DetachedCriteria query);
	/**
	 * ��֤�û������ظ����ֶ�
	 * @param value �ֶ�ֵ 
	 * @param name  �ֶ����
	 * @return 
	 */
	public abstract boolean checkUserItem(String value,String name);
	public abstract void saveUser(User user,List<String> roles,Long peopleId);
	public abstract User setRoles(User user,List<String> roles);
	public abstract User setRoles(Long id,List<String> roles);
	public abstract void updateUser(User user,List<String> roles,Long peopleId);
	public abstract void removeUser(Long id);
	public abstract int[] removeUsers(Long[] ids);
	public abstract User getUserByUsername(String username);
	public abstract boolean checkPassword(String username, String oldPassword);
	public abstract void updatePassword(String username, String newPassword);
	public abstract User loadUserByUsername(String username);
	public abstract User verifyUser(String username,String password);
}